
function RenderItem(position, displayObject)
{
    if (this instanceof RenderItem)
    {
        this.position = position.clone();
        this.displayObject = displayObject;
    }
    else
    {
        return RenderItem(position, displayObject);
    }
}

function Renderer()
{
    if (this instanceof Renderer)
    {
        
    }
    else
    {
        return new Renderer();
    }
}

Renderer.prototype.render = function(renderList, ctx, camera)
{
    for (var i = 0; i < renderList.length; i++)
    {
        var item = renderList[i];
        var cam_pos = camera.finalPosition;
        item.displayObject.draw(ctx, item.position.x - cam_pos.x, item.position.y - cam_pos.y);
    }
}